import matplotlib.pyplot as plt

def plot_helix(nodes):
    fig = plt.figure()
    ax = fig.add_subplot(111, projection='3d')

    # 获取节点坐标
    x = nodes[:, 0]
    y = nodes[:, 1]
    z = nodes[:, 2]

    # 绘制螺旋曲梁
    ax.plot(x, y, z, '-o', label='Helix Beam', markersize=4)

    # 设置图形标签
    ax.set_xlabel('X 轴')
    ax.set_ylabel('Y 轴')
    ax.set_zlabel('Z 轴')
    ax.set_title('三维曲梁螺旋模型')
    ax.legend()

    plt.rcParams['font.sans-serif'] = ['SimHei']  # 黑体
    plt.rcParams['font.family'] = 'sans-serif'
    plt.rcParams['axes.unicode_minus'] = False  # 正确显示负号

    plt.show()
